<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>机构待审核</title>
    <%@ include file="../../common/meta.jsp" %>
    <%@ include file="../../common/common-body.jsp" %>
    <link href="${ctx}/css/page/common-list.css?t=${now}" rel="stylesheet">
    <link href="${ctx}/css/page/common-search.css?t=${now}" rel="stylesheet">
    <style>
    </style>
</head>
<script>
    var OperateType = '${OperateType}';
   var checkResultTypeMap = ${checkResultTypeMap};
    var searchInfo = ${searchInfo};
</script>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="tabs-container">
        <ul class="nav nav-tabs">
            <c:if test="${not empty searchInfo && searchInfo.isCheckExist == 1}">
                <li class="">
                    <a href="${ctx}/checkOrgApp/pendingCheckOrgPage" aria-expanded="true">待审核</a>
                </li>
            </c:if>
            <li class="active">
                <a href="${ctx}/checkOrgApp/checkedOrgAppPage?isCheckExist=${not empty searchInfo ? searchInfo.isCheckExist : 1}" aria-expanded="true">已审核</a>
            </li>
        </ul>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-search"></i> 筛选查询</h5>
                    </div>
                    <div class="ibox-content ibox-content-search">
                        <form class="form-horizontal m-t" id="searchForm" novalidate="novalidate">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">查询机构：</label>
                                <div class="col-sm-5">
                                    <input type="text" id="orgName" name="orgName" value="${not empty searchInfo ? searchInfo.orgName : ''}" onkeydown="if(event.keyCode==13){doRefresh();return false;}"  class="form-control"  placeholder="输入机构名称" maxlength="30">
                                </div>
                                <label class="col-sm-1 control-label">审核结果：</label>
                                <div class="col-sm-2">
                                    <select class="form-control" name="result" id="results" onchange="doRefresh()">
                                        <option value="">--请选择--</option>
                                        <c:forEach items="${checkResultTypeMap}" var="item">
                                            <option value="${item.key}" ${not empty searchInfo && searchInfo.result == item.key ? 'selected' : '' } >${item.value}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                                <div class="ibox-tools ibox-tools-search">
                                    <button type="button" class="btn btn-primary btn-outline" onclick="doRefresh()">查询</button>
                                    <button type="button" class="btn btn-primary btn-outline" onclick="clearFrom('searchForm')">重置</button>
                                    <button type="button" class="btn btn-primary btn-outline" onclick="openSearchTools();"><i class="fa fa-caret-down"></i></button>
                                </div>
                            </div>
                            <div class="search-tools">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">服务商：</label>
                                    <div class="col-sm-5">
                                        <div class="input-group">
                                            <input type="hidden" id="isvPid" value="${not empty searchInfo ? searchInfo.isvPid : ''}" name="isvPid">
                                            <input type="text" id="isvName" name="isvName" value="${not empty searchInfo ? searchInfo.isvName : ''}" class="form-control" placeholder="输入服务商">
                                            <div class="input-group-btn" style="width: 0px;">
                                                <button type="button" class="btn btn-default dropdown-toggle mySearchBtn" data-toggle="dropdown">
                                                    <span class="caret"></span>
                                                </button>
                                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                    <label class="col-sm-1 control-label">审核类型：</label>
                                    <div class="col-sm-2">
                                        <select class="form-control" name="checkType" id="checkType" onchange="doRefresh()">
                                            <option value="">--请选择--</option>
                                            <c:if test="${not empty OperateType}">
                                                <c:forEach items="${OperateType}" var="item">
                                                    <option value="${item.key}" ${not empty searchInfo && searchInfo.checkType == item.key ? 'selected' : '' } >${item.value}</option>
                                                </c:forEach>
                                            </c:if>
                                        </select>
                                    </div>
                                    <%--<label class="col-sm-1 control-label">关联机构：</label>--%>
                                    <%--<div class="col-sm-5">--%>
                                        <%--<div class="input-group">--%>
                                            <%--<input type="hidden" id="orgCode" name="orgCode">--%>
                                            <%--<input type="text" id="orgName2" name="orgName2" class="form-control" placeholder="输入关联机构">--%>
                                            <%--<div class="input-group-btn" style="width: 0px;">--%>
                                                <%--<button type="button" class="btn btn-default dropdown-toggle mySearchBtn" data-toggle="dropdown">--%>
                                                    <%--<span class="caret"></span>--%>
                                                <%--</button>--%>
                                                <%--<ul class="dropdown-menu dropdown-menu-right" role="menu">--%>
                                                <%--</ul>--%>
                                            <%--</div>--%>
                                        <%--</div>--%>
                                    <%--</div>--%>
                                </div>
                                <div class="form-group">
                                <label class="col-sm-1 control-label">审核时间：</label>
                                    <div class="col-sm-4">
                                        <input placeholder="审核时间" value="${not empty searchInfo ? searchInfo.timeInterval : ''}" class="form-control layer-date" id="timeInterval" name="timeInterval">
                                    </div>
                                <%--<div class="col-sm-2">
                                    <input placeholder="开始时间" value="${not empty searchInfo ? searchInfo.beginTimeStr : ''}" class="form-control layer-date" id="beginTimeStr" name="beginTimeStr">
                                </div>
                              <div class="col-sm-2">
                                    <input placeholder="结束时间" value="${not empty searchInfo ? searchInfo.endTimeStr : ''}" class="form-control layer-date" id="endTimeStr" name="endTimeStr">
                                </div>--%>
                                    <label class="col-sm-2 control-label">业务类型：</label>
                                    <div class="col-sm-2">
                                        <select class="form-control" name="bizCode" id="bizCode" onchange="doRefresh()">
                                            <option value="">--请选择--</option>
                                            <c:forEach items="${bizMap}" var="item">
                                                <option value="${item.code}" ${not empty searchInfo && searchInfo.bizCode == item.code ? 'selected' : '' } >${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-table"></i> 账号信息</h5>
                        <div class="ibox-tools col-sm-offset-2">
                            <button class="btn btn-primary btn-outline" onclick="dodetail()">查看</button>
                            <button class="btn btn-primary btn-outline" onclick="doRefresh()">刷新</button>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <table class='table table-striped table-hover'
                               id="dataTable" data-height="370"
                               data-toggle="table"
                               data-url="${ctx}/checkOrgApp/pageFindCheckedOrgAppData?t=${now}"
                               data-pagination="true"
                               data-side-pagination="server"
                               data-striped="true"
                               data-response-handler="handleServerResult"
                               data-query-params-type=""
                               data-query-params="getParams"
                               data-page-size="${defaultPageSize}"
                               data-page-list="${pageList}">
                            <thead>
                            <tr>
                                <th data-field="result" data-formatter="formatcheckResultTypeMap" data-align="center" data-width="100px">审核结果</th>
                                <th data-field="checkType" data-formatter="formatOperateType" data-align="center" data-width="100px">审核类型</th>
                                <th data-field="bizName" data-width="120px" data-align="center">业务类型</th>
                                <th data-field="orgName" data-width="250px" data-align="center">机构名称</th>
                                <th data-field="isvName" data-formatter="formatIsv" data-events="actionEvents" data-align="center" >服务商</th>
                                <th data-field="operatorCommit" data-formatter="formatterCommit" data-align="center" data-width="100px">提交人</th>
                                <th data-field="operator" data-formatter="formatterCheck" data-align="center" data-width="100px">审核人</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="text-center">${companyName}</div>
            </div>
        </div>
    </div>
</div>

<script src="${ctx}/js/check/orgApp/checkedOrgAppMgr.js?t=${now}"></script>
</body>
</html>
